package ru.sh.cloud;

import framework.GameConfig;
import framework.managers.MathManager;
import framework.objects.DynamicGameObject;

public class DynamicCloud extends DynamicGameObject {

	private int dx = 40;
	
	public DynamicCloud() {
		y = MathManager.getRandom().nextInt(GameConfig.BASE_HEIGHT);
		x = -GameConfig.BASE_WIDTH;
	}
	
	public void update(float deltaTime) {
		
		x += dx * deltaTime;
		if (x > GameConfig.BASE_WIDTH + width) {
			x = -GameConfig.BASE_WIDTH;
			y = MathManager.getRandom().nextInt(GameConfig.BASE_HEIGHT);
		}
		
	}

	@Override
	protected void initPresentation() {
		// TODO Auto-generated method stub
		
	}

}
